﻿@model ShoppingCartModel.OrderReviewDataModel
@using SmartStore.Web.Models.ShoppingCart;
@if (Model.Display)
{
    <div class="order-review-data-box">
        <div class="row-fluid">

            <div class="billinginfo span12">
                <div class="block block-bordered">
                    <div class="block-title">
                        <span>@T("Order.BillingAddress")</span>
                        <a class="change-checkout-data pull-right" href='@Url.RouteUrl("CheckoutBillingAddress")'>@T("Common.Change")</a>
                    </div>
                    <div class="block-body">
                        <div class="name">
                            @Model.BillingAddress.FirstName @Model.BillingAddress.LastName
                        </div>
                        <div class="email">
                            @T("Order.Email"): @Model.BillingAddress.Email
                        </div>
                        @if (Model.BillingAddress.PhoneEnabled)
                        {
                            <div class="phone">
                                @T("Order.Phone"): @Model.BillingAddress.PhoneNumber
                            </div>
                        }
                        @if (Model.BillingAddress.FaxEnabled)
                        {
                            <div class="fax">
                                @T("Order.Fax"): @Model.BillingAddress.FaxNumber
                            </div>
                        }
                        @if (Model.BillingAddress.CompanyEnabled && !String.IsNullOrEmpty(Model.BillingAddress.Company))
                        {
                            <div class="company">
                                @Model.BillingAddress.Company
                            </div>
                        }
                        @if (Model.BillingAddress.StreetAddressEnabled)
                        {
                            <div class="address1">
                                @Model.BillingAddress.Address1
                            </div>
                        }
                        @if (Model.BillingAddress.StreetAddress2Enabled && !String.IsNullOrEmpty(Model.BillingAddress.Address2))
                        {
                            <div class="address2">
                                @Model.BillingAddress.Address2
                            </div>
                        }
                        @if (Model.BillingAddress.CityEnabled ||
                            Model.BillingAddress.StateProvinceEnabled ||
                            Model.BillingAddress.ZipPostalCodeEnabled)
                        {
                            <div class="city-state-zip">
                                @if (Model.BillingAddress.CityEnabled)
                                {
                                    @Model.BillingAddress.City
                                }
                                @if (Model.BillingAddress.CityEnabled && (Model.BillingAddress.StateProvinceEnabled || Model.BillingAddress.ZipPostalCodeEnabled))
                                {
                                    <text>,</text>
                                }
                                @if (Model.BillingAddress.StateProvinceEnabled)
                                {
                                    @Model.BillingAddress.StateProvinceName
                                }
                                @if (Model.BillingAddress.ZipPostalCodeEnabled)
                                {
                                    @Model.BillingAddress.ZipPostalCode
                                }
                            </div>
                        }
                        @if (Model.BillingAddress.CountryEnabled && !String.IsNullOrEmpty(Model.BillingAddress.CountryName))
                        {
                            <div class="country">
                                @Model.BillingAddress.CountryName
                            </div>
                        }
                        </div>
                </div>
            </div>
            @if (Model.IsShippable)
            {
                <div class="shippinginfo span12">
                    <div class="block block-bordered">
                        <div class="block-title">
                            <span>@T("Order.ShippingAddress")</span>
                            <a class="change-checkout-data pull-right" href='@Url.RouteUrl("CheckoutShippingAddress")'>@T("Common.Change")</a>
                        </div>
                        <div class="block-body">
                            <div class="name">
                                @Model.ShippingAddress.FirstName @Model.ShippingAddress.LastName
                            </div>
                            <div class="email">
                                @T("Order.Email"): @Model.ShippingAddress.Email
                            </div>
                            @if (Model.ShippingAddress.PhoneEnabled)
                            {
                                <div class="phone">
                                    @T("Order.Phone"): @Model.ShippingAddress.PhoneNumber
                                </div>
                            }
                            @if (Model.ShippingAddress.FaxEnabled)
                            {
                                <div class="fax">
                                    @T("Order.Fax"): @Model.ShippingAddress.FaxNumber
                                </div>
                            }
                            @if (Model.ShippingAddress.CompanyEnabled && !String.IsNullOrEmpty(Model.ShippingAddress.Company))
                            {
                                <div class="company">
                                    @Model.ShippingAddress.Company
                                </div>
                            }
                            @if (Model.ShippingAddress.StreetAddressEnabled)
                            {
                                <div class="address1">
                                    @Model.ShippingAddress.Address1
                                </div>
                            }
                            @if (Model.ShippingAddress.StreetAddress2Enabled && !String.IsNullOrEmpty(Model.ShippingAddress.Address2))
                            {
                                <div class="address2">
                                    @Model.ShippingAddress.Address2
                                </div>
                            }
                            @if (Model.ShippingAddress.CityEnabled ||
                            Model.ShippingAddress.StateProvinceEnabled ||
                            Model.ShippingAddress.ZipPostalCodeEnabled)
                            {
                                <div class="city-state-zip">
                                    @if (Model.ShippingAddress.CityEnabled)
                                    {
                                        @Model.ShippingAddress.City
                                    }
                                    @if (Model.ShippingAddress.CityEnabled && (Model.ShippingAddress.StateProvinceEnabled || Model.ShippingAddress.ZipPostalCodeEnabled))
                                    {
                                        <text>,</text>
                                    }
                                    @if (Model.ShippingAddress.StateProvinceEnabled)
                                    {
                                        @Model.ShippingAddress.StateProvinceName
                                    }
                                    @if (Model.ShippingAddress.ZipPostalCodeEnabled)
                                    {
                                        @Model.ShippingAddress.ZipPostalCode
                                    }
                                </div>
                            }
                            @if (Model.ShippingAddress.CountryEnabled && !String.IsNullOrEmpty(Model.ShippingAddress.CountryName))
                            {
                                <div class="country">
                                    @Model.ShippingAddress.CountryName
                                </div>
                            }
                                </div>
                    </div>
                </div>
            }

        </div>

        @if (!String.IsNullOrEmpty(Model.PaymentMethod))
        {
            <div class="payment-method">
                <div class="block block-bordered">
                    <div class="block-title">
                        <span>@T("Order.PaymentMethod")</span>
                        <a class="change-checkout-data pull-right" href='@Url.RouteUrl("CheckoutPaymentMethod")'>@T("Common.Change")</a>
                    </div>
                    <div class="block-body">
                        @Model.PaymentMethod
                    </div>
                </div>
            </div>
        }

        @if (!String.IsNullOrEmpty(Model.ShippingMethod))
        {
            <div class="shipping-method">
                <div class="block block-bordered">
                    <div class="block-title">
                        <span>@T("Order.ShippingMethod")</span>
                        <a class="change-checkout-data pull-right" href='@Url.RouteUrl("CheckoutShippingMethod")'>@T("Common.Change")</a>
                    </div>
                    <div class="block-body">
                        @Model.ShippingMethod
                    </div>
                </div>
            </div>
        }

    </div>
}